﻿#include "CashFactory.h"
#include "CashNormal.h"
#include "CashRebate.h"
#include "CashReturn.h"

CashSuper* CashFactory::createCashAccept(int type)
{
    CashSuper* ret = nullptr;
    switch (type) {
    case 0:
        ret = new CashNormal();
        break;
    case 1:
        ret = new CashRebate("0.8");
        break;
    case 2:
        ret = new CashReturn("300", "100");
        break;
    default:
        break;
    }
    return ret;
}
